//
//  ZGSTableViewCell.m
//  Tour
//
//  Created by dllo on 15/10/30.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "ZGSTableViewCell.h"
//#import "AdvanceEdit.h"
#define HEIGHT self.contentView.frame.size.height
#define WIDTH self.contentView.frame.size.width
#define CENTERY self.contentView.center.y
#define CENTERX self.contentView.center.x
@implementation ZGSTableViewCell
- (void)dealloc{
    [_viewImage release];
    [_labelGo release];
    [_labelLike release];
    [_labelTitle release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)creatView{
    self.viewImage = [[UIImageView alloc] init];
    [self.contentView addSubview:self.viewImage];
    [_viewImage release];
    self.labelTitle = [[UILabel alloc] init];
    [self.viewImage addSubview:self.labelTitle];
    [_labelTitle release];
    self.labelLike = [[UILabel alloc] init];
    [self.viewImage addSubview:self.labelLike];
    [_labelLike release];
    self.labelGo = [[UILabel alloc] init];
    [self.viewImage addSubview:self.labelGo];
    [_labelGo release];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.viewImage.frame = CGRectMake(5, 5, WIDTH - 10, HEIGHT - 10);
    self.labelTitle.frame = CGRectMake(5, CENTERY + CENTERY / 2, self.viewImage.frame.size.width - 10, 20);
    self.labelLike.frame = CGRectMake(5, 5, self.viewImage.frame.size.width - 10, 10);
    self.labelLike.font = [UIFont systemFontOfSize:10];
    self.labelGo.frame = CGRectMake(5, 30, self.viewImage.frame.size.width - 10, 10);
    self.labelGo.font = [UIFont systemFontOfSize:10];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
